package edu.temple.mobile;

import edu.temple.mobile.displayClasses.BusRoutesDisplayActivity;
import edu.temple.mobile.displayClasses.TrolleyRoutesDisplayActivity;
import android.app.Activity;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.AdapterView.OnItemSelectedListener;

public class TransitViewActivityRouteSelectorActivity extends Activity {
	Intent intent;
	private ImageButton homeButton;
	private ImageButton trolleyButton;
	private ImageButton busButton;
	private TextView title;
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.transitview_transportation);

	    /** !!!!!!!!!!!!!!!ALL ICON BUTTON CODE */
		
		/**Home button */
		homeButton = (ImageButton) findViewById(R.id.actionLogoIcon);
		homeButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				
				Intent intent = new Intent(TransitViewActivityRouteSelectorActivity.this,SEPTripActivity.class);
				intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	            startActivity(intent);
			}
		});
		title = (TextView) findViewById(R.id.title);
		title.setText("TransitView");
		
		trolleyButton = (ImageButton) findViewById(R.id.transitview_trolleybutton);
		trolleyButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				
				intent = new Intent(TransitViewActivityRouteSelectorActivity.this, TrolleyRoutesDisplayActivity.class);
				TransitViewActivityRouteSelectorActivity.this.startActivity(intent);
			}
		});
		
		busButton = (ImageButton) findViewById(R.id.transitview_busbutton);
		busButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				
				intent = new Intent(TransitViewActivityRouteSelectorActivity.this, BusRoutesDisplayActivity.class);
				TransitViewActivityRouteSelectorActivity.this.startActivity(intent);
			}
		});
	}
	@Override
	public void onAttachedToWindow() {
		super.onAttachedToWindow();
		Window window = getWindow();
		window.setFormat(PixelFormat.RGBA_8888);
	}

}
